﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using LUStationery.Controller;
using LUStationery.Model;



public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //if (Page.User.Identity.Name.Length > 0)
        //{
        //    UsersControl userscont = new UsersControl();
        //    string username = Page.User.Identity.Name.ToString();
        //    User user = userscont.getUserByUserName(username);
        //    string role=user.Role.ToString();
        //    if (role == "clerk" || role == "supervisor" || role == "manager")
        //    {
        //        Response.Write("Store side");
        //    }
        //    else 
        //    {
        //        Response.Write("Department side");
        //    }
        //}
        //else
        //{
        //     Response.Redirect("login2.aspx");
        //}
    }


    protected void btnLogout_Click(object sender, EventArgs e)
    {
        Session["user"] = null;
        Response.Redirect("login.aspx");
        
    }
}
